package start.aai.controller;

import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import start.aai.entity.Users;
import start.aai.service.UsersService;
import start.aai.common.Result;

@RestController
@RequestMapping("/ai/users")
public class UserController {
    @Resource
    private UsersService usersService;

    //用户登录
    @GetMapping("/UserLogin")
    public Result<Users> UserLogin(@RequestParam("phone") String phone,
                            @RequestParam("password") String password) {
        Users user=usersService.UserLogin(phone, password);
        return Result.success(user);
    }
}
